<template>
    <div class="xq">
        <Xqson v-for="(v,i) in arr" :key="i" 
        :cakeimage="v.cakeimage" 
        :cakename="v.cakename" 
        :cakeprice="v.cakeprice" 
        :cakeingredients="v.cakeingredients" 
        :scorenum="v.scorenum"   
        :cakeoriginal="v.cakeoriginal"
        />
    </div>
</template>

<script>
import Xqson from "@/components/ddgHD/xqson.vue"
import {getlink} from "@/api/getapi.js"
export default {
    props:["goodsid","cakeimage"],
     data(){
         return {
           arr:[]
         }
     },
     components:{
         Xqson
     },
     created(){
        getlink("http://180.76.121.47:8008/cake").then((ok)=>{
            ok.data.data.forEach((el)=>{
                if(el.goodsid==this.$route.query.goodsid){
                    this.arr.push(el)
                }
            })
        })
    }
}
</script>

<style scoped>
    .xq{
        width: 100%;
        font-size: 0.12rem;
    }
    
</style>